<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateDesignersTable extends Migration
{
    /**
     * Run the migrations.
     * @return void
     */
    public function up()
    {
        Schema::create('designers', function (Blueprint $table) {
            $table->increments('id');
            $table->string('realname', 50)->default('')->comment('真实姓名');
            $table->string('sex', 10)->default('')->comment('性别');
            $table->string('headimg', 100)->default('')->comment('头像');
            $table->string('post', 50)->default('')->comment('职位');
            $table->string('experience', 50)->default('')->comment('工作经验');
            $table->string('goodat', 100)->default('')->comment('擅长');
            $table->string('cost', 50)->default('')->comment('收费标准');
            $table->text('resume')->nullable()->comment('个人简介');
            $table->text('works')->nullable()->comment('主要作品');
            $table->text('idea')->nullable()->comment('设计理念');
            $table->unsignedInteger('fans')->default(0)->comment('人气指数');
            $table->unsignedInteger('trusts')->default(0)->comment('委托数量');
            $table->unsignedInteger('views')->default(0)->comment('浏览次数');
            $table->tinyInteger('status')->default(0)->comment('状态:1显示/0不显示');
            $table->dateTime('created_at')->nullable()->comment('创建时间');
            $table->dateTime('updated_at')->nullable()->comment('更新时间');
        });
    }

    /**
     * Reverse the migrations.
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('designers');
    }
}
